package com.wangxiaotao.springcloud.alibaba.service.impl;

import com.wangxiaotao.springcloud.alibaba.dao.AccountDao;
import com.wangxiaotao.springcloud.alibaba.service.AccountService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import sun.nio.cs.ext.Big5;

import java.math.BigDecimal;

@Service
@Slf4j
@RequiredArgsConstructor
public class AccountServiceImpl implements AccountService {
    private final AccountDao accountDao;

    @Override
    public void decrease(Long userId, BigDecimal money) {
        log.info("----->扣减余额 start");
        accountDao.decrease(userId, money);
        log.info("----->扣减余额 end");
    }
}
